﻿// Copyright (c) 2017 GlassGrass

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GlassGrass.Unity.GuiFramework
	{

	/// <summary> Bindable GuiElement. </summary>
	/// <typeparam name="TDisplay"></typeparam>
	public interface IBindable<TDisplay>
		{

		/// <summary> Begin property binding. </summary>
		/// <typeparam name="TValue"> Type of model property. </typeparam>
		/// <param name="modelObj"> Model object instance. </param>
		/// <param name="propertyName"> Model object property for binding. </param>
		/// <param name="converter"> Value converter. </param>
		/// <returns></returns>
		Binding<TValue, TDisplay> BeginBinding<TValue>(object modelObj, string propertyName, IValueConverter<TValue, TDisplay> converter = null);

		}
	}
